using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using VOL.Entity.DomainModels;
using VOL.demo.IRepositories;

namespace VOL.demo.Services
{
    public partial class unitmodelService
    {
        /// <summary>
        /// 获取所有单位下拉选项
        /// </summary>
        /// <returns>单位列表</returns>
        public async Task<List<unitmodel>> GetUnitOptionsAsync()
        {
            return await repository.GetUnitOptionsAsync();
        }

        /// <summary>
        /// 根据单位ID获取单位信息
        /// </summary>
        /// <param name="unitId">单位ID</param>
        /// <returns>单位信息</returns>
        public async Task<unitmodel> GetUnitByIdAsync(long unitId)
        {
            return await repository.GetUnitByIdAsync(unitId);
        }
    }
}